package com.zw.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.zw.annotation.Excel;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;

@Builder
@NoArgsConstructor
@AllArgsConstructor
@Data
@Schema(name = "BudgetColumnsContent", description = "预算项每列的信息")
@TableName("pt_budget_columns_content")
public class BudgetColumnsContent implements Serializable {


    @Schema(description = "主键")
    private Long id;          // 主键

    @Schema(description = "预算项id")
    private Long budgetId;    // 预算项id

    @NotNull(message = "列id不能为")
    @Schema(description = "列id")
    private Long columnsId;   // 列id

    @Schema(description = "行id")
    private String rowId;       //行id

    @Schema(description = "内容")
    private String content;      // 本行本列内容

    @Schema(description = "删除标志")
    @TableLogic(value = "0", delval = "1")
    private Integer delFlag;      // 0-正常，1-删除

    @Schema(description = "创建时间")
    @TableField(fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NEVER)
    @Excel(name = "创建时间", dateFormat = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @Schema(description = "更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @Excel(name = "创建时间", dateFormat = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;
}
